package ar.com.gep.soccer.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import ar.com.cdt.framework.persistence.entity.Base;

@Entity
public class Game extends Base {

	private static final long serialVersionUID = 7489834245054602433L;

	@Column(columnDefinition = "boolean default false")
	private Boolean state;

	@ManyToOne
	@JoinColumn(name = "team_home_id", nullable = false)
	private Team home;

	@ManyToOne
	@JoinColumn(name = "team_away_id", nullable = false)
	private Team away;

	@Column
	private Integer goalHome;

	@Column
	private Integer goalAway;

	public Boolean getState() {
		return state;
	}

	public void setState(Boolean state) {
		this.state = state;
	}

	public Team getHome() {
		return home;
	}

	public void setHome(Team home) {
		this.home = home;
	}

	public Team getAway() {
		return away;
	}

	public void setAway(Team away) {
		this.away = away;
	}

	public Integer getGoalHome() {
		return goalHome;
	}

	public void setGoalHome(Integer goalHome) {
		this.goalHome = goalHome;
	}

	public Integer getGoalAway() {
		return goalAway;
	}

	public void setGoalAway(Integer goalAway) {
		this.goalAway = goalAway;
	}

}
